WPS Office.apk(点击下载) / oje.java


package defpackage;

import com.fasterxml.jackson.core.util.MinimalPrettyPrinter;
import defpackage.msj;
import defpackage.msm;
import defpackage.msn;
import java.io.IOException;

/* renamed from: oje  reason: default package */
public final class oje extends ojf {
    private static final ojl qCb = new ojl("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
    private static final ojl qCc = new ojl("o", "urn:schemas-microsoft-com:office:office");
    private static final ojl qCd = new ojl("m", "urn:schemas-microsoft-com:office:office");
    private static final ojl qCe = new ojl("", "http://www.w3.org/TR/REC-html40");
    private static final ojl qCf = new ojl("v", "urn:schemas-microsoft-com:vml");
    private static final ojl qCg = new ojl("w10", "urn:schemas-microsoft-com:office:word");
    private npi oSC;
    private ohn qCh;
    private long qCi;
    private long qCj;
    private long qCk;
    private long qCl;
    private ojr qCm = new ojr(this.oOy);

    public oje(npi npi, ojo ojo) throws IOException {
        super(npi.oOy, ojo);
        this.oSC = npi;
        this.qCn = new oju(this.qwn, this.oOy);
        this.qCh = new ohm(this.qwn, this.oSC, this.qCm.qGo);
        this.qCi = -1;
        this.qCj = -1;
        this.qCk = -1;
        this.qCl = -1;
        ew.assertNotNull("mXHtmlTextWriter should not be null!", this.qwn);
        for (int i = 0; ((long) i) < 100; i++) {
            this.qwn.write(MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR);
        }
    }

    public final void close() throws IOException {
        ew.eH();
        ew.eH();
        ew.eH();
        ew.eH();
        ew.assertNotNull("mXHtmlTextWriter should not be null!", this.qwn);
        try {
            this.qwn.seek(0);
            this.qwn.writeLine("Version:1.0");
            this.qwn.l("StartHTML:%d", Long.valueOf(this.qCi));
            this.qwn.l("EndHTML:%d", Long.valueOf(this.qCj));
            this.qwn.l("StartFragment:%d", Long.valueOf(this.qCk));
            this.qwn.l("EndFragment:%d", Long.valueOf(this.qCl));
        } catch (IOException e) {
            hm.d("HtmlClipboardDocument", "IOException", e);
        }
        ew.assertNotNull("mXHtmlTextWriter should not be null!", this.qwn);
        this.qwn.close();
    }

    public final void ejc() throws IOException {
        ew.assertNotNull("mXHtmlTextWriter should not be null!", this.qwn);
        ew.assertNotNull("mXHtmlTextWriter should not be null!", this.qwn);
        this.qCi = this.qwn.ahm();
        this.qwn.write("<");
        this.qwn.aq(oji.Html);
        this.qwn.a(qCc);
        this.qwn.writeLine();
        this.qwn.a(qCb);
        this.qwn.writeLine();
        this.qwn.a(qCd);
        this.qwn.writeLine();
        this.qwn.a(qCe);
        this.qwn.writeLine();
        this.qwn.a(qCf);
        this.qwn.writeLine();
        this.qwn.a(qCg);
        this.qwn.write(">");
        this.qwn.writeLine();
        ew.assertNotNull("mXHtmlTextWriter should not be null!", this.qwn);
        this.qCk = this.qwn.ahm();
        oii eje = this.qwn.eje();
        ew.assertNotNull("commentWriter should not be null!", eje);
        eje.Nh("StartFragment");
        this.qwn.writeLine();
        ew.assertNotNull("mHeadElement should not be null!", this.qCn);
        this.qCn.ejc();
        this.qwn.c(oji.Body);
        this.qwn.write(MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR);
        ogy ogy = new ogy(this.qwn, (mgh) this.oOy.dFb());
        ogy.qwn.a(ojh.Style);
        ogy.qwn.ejg();
        this.qwn.write(">");
        if (this.oOy.dFb().getType() == 0) {
            this.qwn.writeLine();
            this.qwn.c(oji.Div);
            this.qwn.write(MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR);
            this.qwn.a(ojh.Class);
            this.qwn.ejd().write("WordSection1");
            this.qwn.ejg();
            oip.a(this.qwn, this.oOy.dFb().dEi().dPc());
            this.qwn.write(">");
            this.qwn.writeLine();
        }
        this.qCh.dnS();
        this.qwn.writeLine();
        this.qwn.e(oji.Div);
        ogx ogx = new ogx(this.qwn, (mgh) this.oKR.Oe(3), this.qCm.qGp);
        ew.assertNotNull("mXHtmlTextWriter should not be null!", ogx.qwn);
        ogx.qwn.c(oji.Div);
        ogx.qwn.write(MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR);
        ogx.qwn.a(ojh.Style);
        ogx.qwn.write("mso-element: comment-list");
        ogx.qwn.ejg();
        ogx.qwn.write(">");
        ew.assertNotNull("mContext should not be null!", ogx.qwA);
        ew.assertNotNull("mDocument should not be null!", ogx.oSc);
        int size = ogx.qwA.pUg.size();
        for (int i = 0; i < size; i++) {
            msn.a aVar = ogx.qwA.pUg.get(i);
            ew.assertNotNull("txtNode should not be null!", aVar);
            ogv ogv = new ogv(ogx.qwn, aVar, ogx.oSc, ogx.qwA);
            ew.assertNotNull("mXHtmlTextWriter should not be null!", ogv.qwn);
            ogv.qwn.c(oji.Div);
            ogv.qwn.write(MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR);
            ogv.qwn.a(ojh.Style);
            ogv.qwn.write("mso-element: comment");
            ogv.qwn.ejg();
            ogv.qwn.write(">");
            ew.assertNotNull("mXHtmlTextWriter should not be null!", ogv.qwn);
            ew.assertNotNull("mCssTextWriter should not be null!", ogv.qwp);
            ew.assertNotNull("mTxtNode should not be null!", ogv.pPj);
            msm.d dVar = ogv.pPj.oSV;
            ew.assertNotNull("ref should not be null!", dVar);
            ogv.qwn.c(oji.Span);
            ogv.qwn.write(MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR);
            ogv.qwn.a(ojh.Style);
            ogv.qwp.b(oir.MsoCommentAuthor, dVar.author);
            ogv.qwn.ejg();
            ogv.qwn.write(">");
            ogv.qwn.e(oji.Span);
            ew.assertNotNull("mXHtmlTextWriter should not be null!", ogv.qwn);
            ew.assertNotNull("mTxtNode should not be null!", ogv.pPj);
            msj.h dOG = ogv.pPj.dOG();
            ew.assertNotNull("next should not be null!", dOG);
            new ohm(ogv.qwn, new mfb(ogv.oSc, ogv.pPj.dOw(), dOG instanceof msn.a ? dOG.dOw() : ogv.oSc.getLength()), 0, ogv.qwA).dnS();
            ew.assertNotNull("mXHtmlTextWriter should not be null!", ogv.qwn);
            ogv.qwn.e(oji.Div);
        }
        ew.assertNotNull("mXHtmlTextWriter should not be null!", ogx.qwn);
        ogx.qwn.e(oji.Div);
        this.qwn.writeLine();
        this.qwn.e(oji.Body);
        ew.assertNotNull("mXHtmlTextWriter should not be null!", this.qwn);
        oii eje2 = this.qwn.eje();
        ew.assertNotNull("commentWriter should not be null!", eje2);
        eje2.Nh("EndFragment");
        this.qCl = this.qwn.ahm();
        this.qwn.writeLine();
        ew.assertNotNull("mXHtmlTextWriter should not be null!", this.qwn);
        this.qwn.write("</");
        this.qwn.aq(oji.Html);
        this.qwn.write(">");
        this.qCj = this.qwn.ahm();
        this.qwn.writeLine();
    }
}